home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 1.iso / desktop / dviwin29.zip / GENALL.BAT < prev    next >
DOS Batch File  |  1994-12-01  |  945b  |  29 lines

  1. @echo off
  2. if exist %TEMP%\lock_$_$.bat goto RUNNING
  3. copy %1 %TEMP%\lock_$_$.bat > nul
  4. del %1
  5. if exist %TEMP%\error$_$ del %TEMP%\error$_$
  6. %COMSPEC% /e:2048 /c %TEMP%\lock_$_$
  7. del %TEMP%\lock_$_$.bat
  8. if exist %TEMP%\error$_$ goto ERROR
  9. rem
  10. rem The next command instructs dviwin to re-read all the fonts. If you
  11. rem normally start dviwin with the "-1" command line switch, then you
  12. rem need to specify the same switch here too. This operation is valid
  13. rem only under NT, so we test for the OS environment variable.
  14. rem
  15. if not +%OS%+==++ dviwin2 -1r
  16. goto GETOUT
  17. :ERROR
  18. del %TEMP%\error$_$
  19. goto GETOUT
  20. :RUNNING
  21. echo/
  22. echo It seems that another instance of this batch file is already running.
  23. echo If this is true, please wait until it finishes and then run this batch
  24. echo file again. If on the other hand this is not true, delete the file
  25. echo %TEMP%\lock_$_$.bat and then run this batch file again.
  26. echo/
  27. pause
  28. :GETOUT
  29.